package easycloud.ecs.web.exception;

import java.io.Serializable;

import org.springframework.core.NestedRuntimeException;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ResponseStatus;

@SuppressWarnings("serial")
@ResponseStatus(value = HttpStatus.NOT_FOUND)
public class DomainNotFoundException extends NestedRuntimeException {

	private Serializable domainId;

	@SuppressWarnings("rawtypes")
	private Class domainClass;

	public DomainNotFoundException(
			@SuppressWarnings("rawtypes") Class domainClass,
			Serializable domainId) {
		super(domainClass.toString() + " - " + domainId.toString()
				+ " Not Found");
		this.domainClass = domainClass;
		this.domainId = domainId;
	}

	@SuppressWarnings("rawtypes")
	public Class getDomainClass() {
		return domainClass;
	}

	public Serializable getDomainId() {
		return domainId;
	}

}